class D(object):
    def __new__(cls, *args, **kwargs):
        cls.test()
        cls.test2()
        print("D __new__ called")
        print("1:", *args, "2:", **kwargs)
        return super().__new__(cls)

    def __init__(self, *args, **kwargs):
        print("init_1:", *args)
        self.attr=5

    @classmethod
    def test(cls): # 与@staticmethod区别为接收的参数
        print("D test")

    @staticmethod
    def test2():
        print("D test2")

d = D('a', 'b')

d.test()
D.test()
D.test2()


